<template>
  <!-- 微信扫码核销：-->
  <view class="hexiao mainpadding mainbgc">
    <view class="hexiao-item mainpadding ffffff border-r1">
      <view class="add">郑州银基游乐园</view>
      <view class="margin-top minute-box">
        <view class="img border-r2 margin-right">
          <image src="../../static/logo.png" mode=""></image>
        </view>
        <view class="minute flex1">
          <view class="">银基冰雪成人门票</view>
          <view class="pAc flexleft2">
            <text class="tMoney">￥90.00</text>
            <text class="tCount">x1</text>
          </view>
        </view>
      </view>
    </view>
    <view class="hexiao-details mainpadding margin-top ffffff border-r1">
      <view class="flexleft2">
        <view class="it2">订单编号</view>
        <view class="it">x26465132132132132</view>
      </view>
      <view class="flexleft2 margin-top">
        <view class="it2">联系人</view>
        <view class="it">马冬梅</view>
      </view>
      <view class="flexleft2 margin-top">
        <view class="it2">联系电话</view>
        <view class="it">13799639862</view>
      </view>
      <view class="flexleft2 margin-top">
        <view class="it2">创建时间</view>
        <view class="it">2022-12-29-16:26:17</view>
      </view>
    </view>
    <view class="" @click="showPopUp()">
      <view class="buyBtn">确认核销</view>
    </view>
    
    <!-- 弹出层：-->
    <view class="popUp">
      <u-modal :show="show"  showCancelButton="true" @confirm="confirm" @cancel="cancel">
        <view class="slot-content">
          <rich-text :nodes="content" class="text flexleft"></rich-text>
        </view>
      </u-modal>
    </view>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        show: false,
        content: `确定要核销吗？`,
		hexiaojilu:[],
		list: {
			data: []
		},
      }
    },
	onShow() {
		this.init()
	},
    methods: {
      showPopUp() {
        this.show = true
      },
      confirm() {
        console.log('点击了确认')
        this.show = false
      },
      cancel() {
        console.log('点击了取消！')
        this.show = false
      },
	  init(isPage, page) {
	  	let _this = this;
	  	httpRequest.request('api/tourorder/hxMyOrder', 'GET', {
	  		page: page || 1,
	  		limit: _this.limit,
	  		status: this.currenttab,
	  	}, false, false, true).then(res => {
	  		if (res.code == 1) {
	  			let resList = res.data;
	  			let dataList = _this.list;
	  			if (isPage == true) {
	  				_this.list.data = dataList.data.concat(resList.data);
	  			} else {
	  				this.list = res.data
	  				_this.list.data = resList.data;
	  			}
	  			_this.list.data.forEach(item => {
	  				this.$set(item, "itemend", "")
	  				item.itemend = this.djstime(item.expire_tme)
	  			})
	  			setInterval(() => {
	  				_this.list.data.forEach(item => {
	  					item.itemend = this.djstime(item.expire_tme)
	  				})
	  			}, 1000)
	  		}
	  	}).catch(err => {
	  		httpRequest.toast(err.msg);
	  	})
	  },
	  onReachBottom() {
	  	let _this = this;
	  	let list = _this.list;
	  	let page = _this.page;
	  	if (list.last_page <= page) {
	  		return false;
	  	}
	  	page++;
	  	_this.page = page;
	  	_this.init(true, page);
	  },
    }
  }
</script>

<style lang="scss" scoped>
  .add {
    font-size: 28rpx;
    font-family: PingFang SC-Heavy, PingFang SC;
    font-weight: 800;
    color: #333333;
  }
  
  .minute-box {
    display: flex;
  }
  
  .img {
    width: 124rpx;
    height: 124rpx;
    image {
      width: 100%;
      height: 100%;
    }
  }
  
  .pAc {
    margin-top: 50rpx;
  }
  
  .tMoney {
    font-size: 30rpx;
    font-family: DIN Next LT Pro-Bold, DIN Next LT Pro;
    font-weight: bold;
    color: #FF5C00;
  }
  
  .tCount {
    font-size: 26rpx;
    font-family: PingFang SC-Heavy, PingFang SC;
    font-weight: 800;
    color: #999999;
  }
  
  .it {
    font-size: 28rpx;
    font-family: PingFang SC-Medium, PingFang SC;
    font-weight: 500;
    color: #666666;
  }
  
  .it2 {
    font-size: 26rpx;
    font-family: PingFang SC-Medium, PingFang SC;
    font-weight: 500;
    color: #000000;
  }
  
  .buyBtn {
    position: fixed;
    bottom: 30rpx;
    background-color: pink;
    width: calc(100vw - 60rpx);
    text-align: center;
    padding: 18rpx 0;
    background-color: #00D2E1;
    color: #fff;
    border-radius: 64rpx;
  }
  
  .text {
    font-size: 32rpx;
    font-family: PingFang SC-Heavy, PingFang SC;
    font-weight: 800;
    color: #000000;
  }
  
  .slot-content {
    padding: 60rpx 0;
  }
  
  .text {
    justify-content: center;
  }
</style>